// store门店相关
import { post } from '@/api/http'

// 门店列表
const site = {
  // 根据员工查询门店
  site_listBystaff: {
    label: 'siteName',
    keyword: 'siteName',
    key: 'id',
    mode: 'each',
    api: (data: any) => post({ url: '/siteLease/searchForStaff', data }),
  },
  // 查询所有门店
  site_lease_list: {
    label: 'siteName',
    keyword: 'siteNameLike',
    key: 'id',
    mode: 'each',
    data: {
      siteType: 40,
    },
    api: (data: any) => post({ url: '/siteLease/getSiteList', data }),
  },
  // 查询所有门店
  site_lease_list_multiple: {
    label: 'siteName',
    keyword: 'siteNameLike',
    key: 'id',
    mode: 'multiple',
    data: {
      siteType: 40,
    },
    api: (data: any) => post({ url: '/siteLease/getSiteList', data }),
  },
  // 【多选】员工下的门店
  multiple_site_listBystaff: {
    label: 'siteName',
    keyword: 'siteName',
    key: 'id',
    mode: 'multiple',
    api: (data: any) => post({ url: '/siteLease/searchForStaff', data }),
  },
  // 【多选】门店列表
  multiple_site_lease_list: {
    label: 'siteName',
    keyword: 'siteName',
    key: 'id',
    mode: 'multiple',
    data: {
      siteType: 40,
    },
    api: (data: any) => post({ url: '/siteLease/searchSite', data }),
  },
  // 【单选】门店列表
  site_lease_list_2: {
    label: 'siteName',
    keyword: 'siteName',
    key: 'id',
    mode: 'each',
    data: {
      siteType: 40,
    },
    api: (data: any) => post({ url: '/siteLease/searchSite', data }),
  },

  // 查询长租所有门店
  site_lease_list_long: {
    label: 'siteName',
    keyword: 'siteNameLike',
    key: 'id',
    mode: 'each',
    data: {
      orderType: 0,
      siteType: 40,
    },
    api: (data: any) => post({ url: '/siteLease/getSiteList', data }),
  },
  // 订单获取方式模糊搜索
  order_acquisition: {
    label: 'name',
    keyword: 'nameLike',
    key: 'value',
    mode: 'each',
    api: (data: any) => post({ url: '/czsOrderInfo/getOrderAcquisitionTypeLike', data }),
  },
  // 员工下的机构组织列表
  org_listByStaff: {
    label: 'orgName',
    keyword: 'orgName',
    key: 'id',
    mode: 'each',
    api: (data: any) => post({ url: '/org/currentList', data }),
  },
  org_selectAuthListByOrgNameLike: {
    label: 'orgName',
    keyword: 'orgNameLike',
    key: 'orgId',
    mode: 'each',
    api: (data: any) => post({ url: '/org/selectAuthListByOrgNameLike', data }),
  },
  org_listByStaff_multiple: {
    label: 'orgName',
    keyword: 'orgName',
    key: 'id',
    mode: 'multiple',
    api: (data: any) => post({ url: '/org/currentList', data }),
  },
  // 新增报销单/付款单员工下的机构组织列表
  org_add_listByStaff: {
    label: 'orgName',
    keyword: 'orgNameLike',
    key: 'orgId',
    mode: 'each',
    api: (data: any) => post({ url: '/org/selectAuthListByOrgNameLike', data }),
  },
  // 新增报销单/付款单员工下的机构组织列表
  org_add_listByStaff_multiple: {
    label: 'orgName',
    keyword: 'orgNameLike',
    key: 'orgId',
    mode: 'multiple',
    api: (data: any) => post({ url: '/org/selectAuthListByOrgNameLike', data }),
  },
}

export default {
  ...site,
}
